<template name='dibudao'>
	<view class="sixiang">
		<view class="ka" v-for="(item,index) in tab" @click="nav(item.url)">
			<view class="ka_1">
				<image v-if="indexs!=item.type" :src="item.image1" mode=""></image>
				<image v-else :src="item.image2" mode=""></image>
			</view>
			<view :class="indexs!=item.type?'ka_2':'ka_2 active'">
				{{item.name}}
			</view>
		</view>
		
		
		
	</view>
</template>

<script>
	export default {
		name: "dibudao",
		props: {
			indexs: {
				type: String,
				default: ''
			},

		},
		data() {
			return {
				tab: [{
						name: '经销商', 
						type: '1',
						image1: '/static/tabBar/distributor1.png',
						image2: '/static/tabBar/distributor2.png',
						url:'/pages/groundPole/distributor/distributor'
					},
					{
						name: '活动',
						type: '2',
						image1: '/static/tabBar/activity1.png',
						image2: '/static/tabBar/activity2.png',
						url:'/pages/groundPole/activityGround/activityGround'
					},
					{
						name: '上险数据',
						type: '3',
						image1: '/static/tabBar/upper1.png',
						image2: '/static/tabBar/upper2.png',
						url:'/pages/groundPole/upperGround/upperGround'
					},
					{
						name: '我的',
						type: '4',
						image1: '/static/tabBar/mine1.png',
						image2: '/static/tabBar/mine2.png',
						url:'/pages/groundPole/groundMine/groundMine'
					},
				],

			};
		},
		methods: {
			
		nav:function(url){
			uni.reLaunch({
				url:url
			})
		},
		},
	}
</script>

<style lang="scss">
	.sixiang {
		display: flex;
		position: fixed;
		bottom: 0;
		width: 100%;
		padding: 10rpx 0;
		background: #fff;
		z-index: 1000000000000;
		.ka {
			width: 25%;
			text-align: center;
.active{
					color: #1855F6;
				}
			.ka_1 {
				image {
					width: 48rpx;
					height: 48rpx;
				}
				
			}

		}

	}
</style>
